.users {
  display: flex;
  align-items: center;
  padding: 4rem 0;
  width: 100%;
  background-color: var(--ifm-color-emphasis-100);
}

.wideContainer {
  margin: 0 auto;
  padding: 0 var(--ifm-spacing-horizontal);
  width: 100%;
  max-width: 1400px;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 3rem;
  color: var(--ifm-color-emphasis-600);
}

.usersGrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.userItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--ifm-font-color-base);
  transition: transform 0.3s ease;
  padding: 1rem;
  border-radius: 8px;
  width: calc(25% - 2rem); /* Default: 4 items per row with 2rem gap */
}

.userItem:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.userImageContainer {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
}

.userImage {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.userName {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.userNameFallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--ifm-color-primary);
  text-align: center;
}

.joinCommunity {
  font-size: 1.1rem;
  margin-top: 1rem;
}

.joinCommunity a {
  font-weight: bold;
}

/* Responsive styles */
@media (max-width: 996px) {
  .userItem {
    width: calc(33.333% - 2rem); /* 3 items per row */
  }
}

@media (max-width: 768px) {
  .userItem {
    width: calc(50% - 2rem); /* 2 items per row */
  }
}

@media (max-width: 480px) {
  .userItem {
    width: calc(100% - 2rem); /* 1 item per row */
  }

  .users {
    padding: 2rem 0;
  }
}